We make use of data on buyer–supplier relationships between private and publicly listed companies that are part of the FactSet Supply Chain Relationships database. As this database is proprietary, we cannot make it publicly available. However, it can be accessed by any researcher through a subscription to FactSet (or the Wharton Research Data Services), and many universities actually have subscriptions to this database for their students, faculty, and staff. 

Detailed information about the FactSet Supply Chain Relationships data and its accessibility (content, pricing, data structure) can be obtained here:

https://go.factset.com/marketplace/catalog/product/factset-supply-chain-relationships

The data can also be accessed through the Wharton Research Data Services (WRDS). Detailed instructions can be found here:

https://wrds-www.wharton.upenn.edu/pages/about/data-vendors/factset/

Based on the FactSet Supply Chain Relationships data the following input files need to be created:

"2015_adjacency_matrix.mat" -> Adjacency matrix (array) stored in Matlab data file (for the year 2015).
"in_deg_years_us_manuf.mat" -> Matlab data file with firms' in-degrees/number of suppliers (US manufacturing firms only).
"in_deg_years_us.mat" -> Matlab data file with firms' in-degrees/number of suppliers (US firms only).
"in_deg_years_manuf.mat" -> Matlab data file with firms' in-degrees/number of suppliers (manufacturing firms only).
"in_deg_years.mat" -> Matlab data file with firms' in-degrees/number of suppliers (full sample).
"in_deg_distribution.mat" -> Matlab file with the empirical in-degree (number of suppliers) distribution. 
"out_deg_years_us_manuf.mat" -> Matlab data file with firms' out-degrees/number of customers (US manufacturing firms only).
"out_deg_years_us.mat -> Matlab data file with firms' out-degrees/number of customers (US firms only).
"out_deg_years_manuf.mat -> Matlab data file with firms' out-degrees/number of customers (manufacturing firms only).
"out_deg_years.mat -> Matlab data file with firms' out-degrees/number of customers (full samlpe).
"bonacich_years_us_manuf.mat" -> Matlab data file with firms' Katz-Bonacich centralities (US manufacturing firms only).
"bonacich_years_us.mat -> Matlab data file with firms' Katz-Bonacich centralities (US firms only).
"bonacich_years_manuf.mat -> Matlab data file with firms' Katz-Bonacich centralities (manufacturing firms only).
"bonacich_years.mat -> Matlab data file with firms' Katz-Bonacich centralities (full samlpe).
"rewiring_times_us_manuf.csv" -> CSV file with the following colums (US manufacturing firms only): replacement_year; lost_year; time; censored
"rewiring_times_us.csv" -> CSV file with the following colums (US firms only): replacement_year; lost_year; time; censored
"rewiring_times_manuf.csv" -> CSV file with the following colums (manufacturing firms only): replacement_year; lost_year; time; censored
"rewiring_times.csv" -> CSV file with the following colums (full sample): replacement_year; lost_year; time; censored
"sales_years_us_manuf.mat" -> Matlab data file with the following information (US manufacturing firms only): year, sales_firm_1,...,sales_firm_n
"sales_years_us.mat" -> Matlab data file with the following information (US manufacturing firms only): year, sales_firm_1,...,sales_firm_n
"sales_years_manuf.mat" -> Matlab data file with the following information (US manufacturing firms only): year, sales_firm_1,...,sales_firm_n
"sales_years.mat" -> Matlab data file with the following information (US manufacturing firms only): year, sales_firm_1,...,sales_firm_n
"entry_exit_times_us_manuf.csv" -> CSV file with the following colums (US manufacturing firms only): firm_factset_id; entry_time; exit_time; censored
"entry_exit_times_us.csv" -> CSV file with the following colums (US firms only): firm_factset_id; entry_time; exit_time; censored
"entry_exit_times_manuf.csv" -> CSV file with the following colums (manufacturing firms only): firm_factset_id; entry_time; exit_time; censored
"entry_exit_times.csv" -> CSV file with the following colums (full sample): firm_factset_id; entry_time; exit_time; censored
"firm_factset_ids_sic_nation.csv" -> CSV file with the following colums: id; firm_factset_id; firm_sic; firm_nation
"firm_factset_ids_us_manuf.csv" -> Auxiliary CSV file for mapping firm ids across data files with the following colums (US manufacturing firms only): id; firm_factset_id 
"firm_factset_ids_us.csv" -> Auxiliary CSV file for mapping firm ids across data files with the following colums (US firms only): id; firm_factset_id 
"firm_factset_ids_manuf.csv" -> Auxiliary CSV file for mapping firm ids across data files with the following colums (manufacturing firms only): id; firm_factset_id 
"firm_factset_ids.csv" -> Auxiliary CSV file for mapping firm ids across data files with the following colums (full sample): id; firm_factset_id 

All data files should be saved in a folder "./Data/". A directory "./Figures/" for storing the figures and a directory "./Tables/" for storing the estimation output should be created.

This repository contains the following Matlab scripts:

"mle_exit.m" -> Replication file for Figure 3, main text.

"mle_rewiring.m" -> Replication file for Figure 3, main text.

"impulse_response.m" -> Replication file for Figure 5, main text.

"autarky.m" -> Replication file for Figure 6, main text.

"mle_attachment.m" -> Replication file for estimating the attachment kernels. Used as input for "impulse_response.m" and "autarky.m".

"lifetime_bonacich_log_likelihood.m" -> Log-likelihood function for lifetime. Required for "mle_exit.m".

"rewiringtime_log_likelihood.m" -> Log-likelihood function for rewiring times. Required for "mle_rewiring.m".

"scomponents.m" -> Compute the strongly connected components of a graph. Required for "autarky.m".

"charpath.m" -> Characteristic path length, global efficiency and related statistics. Required for "autarky.m".

"modularity_dir.m" -> The modularity is a statistic that quantifies the degree to which the network may be subdivided into such clearly delineated groups. Required for "autarky.m".


